<?php
/**
 * Created by PhpStorm.
 * User: andy
 * Date: 16/4/9
 * Time: 13:42
 */
class Wechat_Lite extends Wechat_Class {



    /**
     * 设置缓存，按需重载
     * @param string $cachename
     * @param mixed $value
     * @param int $expired
     * @return boolean
     */
    protected function setCache($cachename,$value,$expired){
        return  DI()->cache->set("wechat:".$cachename,$value,$expired);
    }

    /**
     * 获取缓存，按需重载
     * @param string $cachename
     * @return mixed
     */
    protected function getCache($cachename){
        return DI()->cache->get("wechat:".$cachename);
    }

    /**
     * 清除缓存，按需重载
     * @param string $cachename
     * @return boolean
     */
    protected function removeCache($cachename){
        return DI()->cache->delete("wechat:".$cachename);
    }
}